import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { getSessionStorage } from "@/common";

import './assets/framework/font-awesome/css/font-awesome.min.css';

const app = createApp(App)


app.use(router)
app.use(ElementPlus)
router.beforeEach(function(to,from,next){
    let users = getSessionStorage('user');
    if(!(to.path=='/'||to.path=='login'||to.path=='/register'||to.path=='/updatepass')){
        if(users==null){
            router.push("/")
        }
    }
    next();
})

app.mount('#app')
createApp(App).use(router).mount('#app')
